#include <iostream>
#include <map>
#include <string>
using namespace std;

void Dictionary(){
  map<string, string> dict;
  dict.insert(pair<string, string>("string", "字符串"));
  typedef pair<string, string> DictKV;
  dict.insert(DictKV("peach", "桃子"));
  dict.insert(make_pair("dictionary", "字典"));
  dict.insert(make_pair("temporary", "短暂的"));
  dict.insert(make_pair("declaration", "声明"));

  //map<string, string>::iterator it = dict.begin();
  //auto it = dict.begin();
  //while(it != dict.end())
  //{
  //  //cout << (*it).first << ":" << (*it).second << endl;
  //  cout << it->first << ":" << it->second << endl;
  //  ++it;
  //}
  //for(pair<const string, string> &e : dict)
  for(auto &e : dict)
  {
    cout << e.first << ":" << e.second << endl; 
  }
  
  string input;
  while(cin >> input)
  {
    auto ret = dict.find(input);
    if(ret != dict.end())
    {
      cout << ret->first << ":" << ret->second << endl;
    }
    else{
      cout << "There is no such word!" << endl;
    }
  }
}

void WordCounter(){
  map<string, int> counter;
  string arr[] = { "苹果", "西瓜", "苹果", "西瓜", "苹果", "苹果", "西瓜","苹果", "香蕉", "苹果", "香蕉"};
	//for(string &e : arr)
	//{
	//	auto ret = counter.find(e);
	//	if(ret != counter.end())
  //  {
  //    ++ret->second; 
  //  }	
  //  else{
  //    counter.insert(make_pair(e,1));
  //  }
	//}
  for(string &e : arr)
  {
    ++counter[e];
  }
  for(auto &e : counter)
  {
    cout << e.first << ":" << e.second << endl;
  }
}

int main(){
  //Dictionary();
  WordCounter();
  return 0;
}
